package com.quick.android.demo;

import android.os.Bundle;
import android.webkit.WebView;

import com.quick.android.ui.BaseActivity;
import com.quick.android.utils.WebViewHelper;

/**
 * Created by 科技 on 2015-12-28.
 */
public class WebActivity extends BaseActivity {
    private WebView mWebView;
    private WebViewHelper mWebControll;

    @Override
    public void initViews() {
        mWebView = new WebView(this);
        setContentView(mWebView);
        mWebControll = new WebViewHelper(this, mWebView);
    }

    @Override
    public void initEvent() {

    }

    @Override
    public void getIntentData() {

    }

    @Override
    public void initData(Bundle savedInstanceState) {
        mWebView.loadUrl("http://www.baidu.com");
    }


    @Override
    public void onBackPressed() {
        if(mWebControll.goBack()){
            return;
        }
        super.onBackPressed();
    }

    @Override
    protected void onResume() {
        super.onResume();
        mWebControll.onResume();
    }

    @Override
    protected void onPause() {
        super.onPause();
        mWebControll.onPause();
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        mWebControll.onDestroy();
    }
}
